﻿namespace BorgExt
{
    public interface IBehavior
    {
        void Bind(Slot slot);
        void Bind(Composer composer);

        void Unbind(Slot slot);
        void Unbind(Composer composer);

        bool CanActivate(ExtensionEventArgs args, out LogEventArgs log);
        void Activating(ExtensionEventArgs args);
        void Activated(ExtensionEventArgs args);

        bool CanOpen(SlotEventArgs args, out LogEventArgs log);
        void Opening(SlotEventArgs args);
        void Opened(SlotEventArgs args);

        bool CanPlug(CompositionEventArgs args, out LogEventArgs log);
        void Plugging(CompositionEventArgs args);
        void Plugged(CompositionEventArgs args);

        bool CanSelect(CompositionEventArgs args, out LogEventArgs log);
        void Selecting(CompositionEventArgs args);
        void Selected(CompositionEventArgs args);

        bool CanDeactivate(ExtensionEventArgs args, out LogEventArgs log);
        void Deactivating(ExtensionEventArgs args);
        void Deactivated(ExtensionEventArgs args);

        bool CanClose(SlotEventArgs args, out LogEventArgs log);
        void Closing(SlotEventArgs args);
        void Closed(SlotEventArgs args);

        bool CanUnplug(CompositionEventArgs args, out LogEventArgs log);
        void Unplugging(CompositionEventArgs args);
        void Unplugged(CompositionEventArgs args);

        bool CanDeselect(CompositionEventArgs args, out LogEventArgs log);
        void Deselecting(CompositionEventArgs args);
        void Deselected(CompositionEventArgs args);
    }
}

